/**
 * @Title: KaoQinController.java
 * @Package com.ruoyi.web.controller.kaoqin
 * @Description: 
 * Copyright: Copyright (c) 2019 www.codepeople.cn Inc. All rights reserved. 
 * Website: www.codepeople.cn
 * 注意：本内容仅限于海南科澜技术信息有限公司内部传阅，禁止外泄以及用于其他的商业目 
 * @Author 刘仁
 * @DateTime 2019年5月20日 下午4:42:12
 * @version V1.0
 */

package com.ruoyi.web.controller.supervise.project;


import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpSession;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.supervise.domain.CLCheckOption;
import com.ruoyi.supervise.domain.CompletionRecordInfo;
import com.ruoyi.supervise.domain.ConsturctionLicenceInfo;
import com.ruoyi.supervise.service.ICompletionRecordInfoService;
import com.ruoyi.supervise.service.IConsturctionLicenceInfoService;

/**
 * @ClassName: projectAllController
 * @Description: 
 * @Author 吴挺杰
 * @DateTime 2019年11月11日 下午3:53:43
 */
@Controller
@RequestMapping("/project/projectAll")
public class projectAllController extends BaseController{

	private String prefix = "supervise/project/projectAll";
	private String consturctionLicenceInfoPrefix = "supervise/ConsturctionLicenceInfo";
	private String completionRecordInfoprefix = "supervise/CompletionRecord";
	private String surveyResultsPrefix = "supervise/SurveyResults";
	private String constructionDrawingReviewPrefix = "supervise/ConstructionDrawing";
	private String supervisoryInformationPrefix = "supervise/SupervisoryInformation";
	private String materialTestingPrefix = "supervise/materialTesting";
	
	@Autowired
    private IConsturctionLicenceInfoService consturctionLicenceInfoService;
	
	@Autowired
    private ICompletionRecordInfoService completionRecordInfoService;
	
	@RequiresPermissions("project:projectAll:view")
	@GetMapping()
	public String projectAll()
	{
	    return prefix + "/projectAll";
	}
	
	 /**
      *  详情
     */
    @GetMapping("/detail")
    public String detail(String name,String company,String price,String area,String address,HttpSession session,ModelMap mmap)
    {
    	session.setAttribute("projectName", name);
    	session.setAttribute("projectCompany", company);
    	session.setAttribute("projectPrice", price);
    	session.setAttribute("projectArea", area);
    	session.setAttribute("projectAddress", address);
    	mmap.put("projectName", name);
    	mmap.put("projectCompany", company);
    	mmap.put("projectPrice", price);
    	mmap.put("projectArea", area);
    	mmap.put("projectAddress", address);
        return prefix + "/projectAllDetail";
    }
    
    @PostMapping("/surveyResults")
    @ResponseBody
    public TableDataInfo surveyResults(HttpSession session)
    {
        startPage();
        Map<String,Object> map=new HashMap<String,Object>();
        List<Map> list=new ArrayList<Map>();
        if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
        {
        	map.put("unitengineeringname", "仁恒海棠公园一期（C区）");
        	map.put("Reconnaissanceunit", "海南岩佳勘察设计有限公司");
        	map.put("constructunit", "海南陆侨集团有限公司");
        	map.put("censorship", "海口市秀英区建设工程质量安全监督站");
        	map.put("state", "已上报");
        	list.add(map);
        }//else if(session.getAttribute("projectName").equals("田德海泉湾A区"))
        else
        {
        	map.put("unitengineeringname", "田德海泉湾A区");
        	map.put("Reconnaissanceunit", "海南岩佳勘察设计有限公司");
        	map.put("constructunit", "海南田德房地产开发有限公司");
        	map.put("censorship", "海口市美兰区建设工程质量安全监督站");
        	map.put("state", "已上报");
        	list.add(map);
        }
        return getDataTable(list);
    }
    
    /**
     *  勘察成果详情
    */
   @GetMapping("/surveyResultsDetail")
   public String surveyResultsDetail(String unitengineeringname,ModelMap mmap)
   {
	if(unitengineeringname.equals("仁恒海棠公园一期（C区）"))
	{
		mmap.put("projectName", "仁恒海棠公园一期（C区）(仁恒海棠公园一期(C区))");
	}//else if(unitengineeringname.equals("田德海泉湾A区"))
	else
	{
		mmap.put("projectName", "田德海泉湾A区(一号楼,三号楼,五号楼,七号楼,四号楼,六号楼,九号楼,十号楼,八号楼,农贸超市,地下车库,二号楼)");
	}
   	mmap.put("unitengineeringname", unitengineeringname);
       return surveyResultsPrefix + "/detail";
   }
   
   @PostMapping("/constructionDrawingReview")
   @ResponseBody
   public TableDataInfo constructionDrawingReview(HttpSession session)
   {
       startPage();
       Map<String,Object> map=new HashMap<String,Object>();
       List<Map> list=new ArrayList<Map>();
       if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
       {
       	map.put("unitengineeringname", "仁恒海棠公园一期（C区）");
       	map.put("constructunit", "海南陆侨集团有限公司");
       	map.put("designunit", "广东博意建筑设计院有限公司");
       	map.put("censorship", "海口市秀英区建设工程质量安全监督站");
       	map.put("state", "已上报");
       	list.add(map);
       }//else if(session.getAttribute("projectName").equals("田德海泉湾A区"))
       else
       {
    	   map.put("unitengineeringname", "田德海泉湾A区");
          	map.put("constructunit", "海南田德房地产开发有限公司");
          	map.put("designunit", "广东博意建筑设计院有限公司");
          	map.put("censorship", "海口市美兰区建设工程质量安全监督站");
          	map.put("state", "已上报");
          	list.add(map);
       }
       return getDataTable(list);
   }
   
   /**
    *  施工图详情
   */
  @GetMapping("/constructionDrawingReviewDetail")
  public String constructionDrawingReviewDetail(String unitengineeringname,ModelMap mmap)
  {
	if(unitengineeringname.equals("仁恒海棠公园一期（C区）"))
	{
		mmap.put("projectName", "仁恒海棠公园一期（C区）(仁恒海棠公园一期(C区))");
	}//else if(unitengineeringname.equals("田德海泉湾A区"))
	else
	{
		mmap.put("projectName", "田德海泉湾A区(一号楼,三号楼,五号楼,七号楼,四号楼,六号楼,九号楼,十号楼,八号楼,农贸超市,地下车库,二号楼)");
	}
  	mmap.put("unitengineeringname", unitengineeringname);
      return constructionDrawingReviewPrefix + "/detail";
  }
    
    @PostMapping("/consturctionLicenceInfo")
    @ResponseBody
    public TableDataInfo consturctionLicenceInfo(ConsturctionLicenceInfo consturctionLicenceInfo,HttpSession session)
    {
        startPage();
        if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
        {
        	consturctionLicenceInfo.setProjectinfoguid("1");
        }else if(session.getAttribute("projectName").equals("海南陵水香水湾B区C-01-1地块项目"))
        {
        	consturctionLicenceInfo.setProjectinfoguid("3");
        }//else if(session.getAttribute("projectName").equals("田德海泉湾A区"))
        else
        {
        	consturctionLicenceInfo.setProjectinfoguid("2");
        }
        List<ConsturctionLicenceInfo> list = consturctionLicenceInfoService.selectConsturctionLicenceInfoListNew(consturctionLicenceInfo);
        return getDataTable(list);
    }
    
    @PostMapping("/completionRecordInfo")
    @ResponseBody
    public TableDataInfo completionRecordInfo(CompletionRecordInfo completionRecordInfo,HttpSession session)
    {
        startPage();
        if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
        {
        	completionRecordInfo.setProjectinfoguid("1");
        }//else if(session.getAttribute("projectName").equals("田德海泉湾A区"))
//        {
//        	completionRecordInfo.setProjectinfoguid("2");
//        }else
//        {
//        	completionRecordInfo.setProjectinfoguid("0");
//        }
        	else
              {
              	completionRecordInfo.setProjectinfoguid("2");
              }
    	List<CompletionRecordInfo> list = completionRecordInfoService.selectCompletionRecordInfoList(completionRecordInfo);
        return getDataTable(list);
    }
    
    /**
	 * 施工许可详情
	*/
	@GetMapping("/consturctionCertInfoDetail")
	public String consturctionCertInfoDetail(String guid, ModelMap mmap,String name,HttpSession session)
	{
		ConsturctionLicenceInfo consturctionLicenceInfo = consturctionLicenceInfoService.selectConsturctionLicenceInfoById(guid);
        mmap.put("consturctionLicenceInfo", consturctionLicenceInfo);
        session.setAttribute("guid", guid);
        return consturctionLicenceInfoPrefix + "/detail";
	}
	
	 /**
     * 工程竣工验收备案信息详情
     */
    @GetMapping("/completionRecordInfoDetail")
    public String detail(String guid, ModelMap mmap)
    {
        CompletionRecordInfo completionRecordInfo = completionRecordInfoService.selectCompletionRecordInfoById(guid);
        mmap.put("completionRecordInfo", completionRecordInfo);
        return completionRecordInfoprefix + "/detail";
    }
    
    @PostMapping("/supervisoryInformation")
    @ResponseBody
    public TableDataInfo supervisoryInformation(HttpSession session)
    {
        startPage();
        Map<String,Object> map=new HashMap<String,Object>();
        List<Map> list=new ArrayList<Map>();
        if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
        {
        	map.put("name", "仁恒海棠公园一期（C区）(仁恒海棠公园一期(C区))");
        	map.put("unitEngineering", "仁恒海棠公园一期(C区)");
        	map.put("supervisionUnit", "海口市秀英区建设工程质量安全监督站");
        	map.put("status", "监督中");
        	map.put("applicationTime", "2019/6/2");
        	list.add(map);
        }//else if(session.getAttribute("projectName").equals("田德海泉湾A区"))
//        {
//        	map.put("name", "田德海泉湾A区项目");
//        	map.put("unitEngineering", "六号楼、八号楼、七号楼、九号楼、五号楼、十号楼、农贸超市、四号楼、三号楼、地下车库、一号楼、二号楼");
//        	map.put("supervisionUnit", "海口市美兰区建设工程质量安全监督站");
//        	map.put("status", "监督中");
//        	map.put("applicationTime", "2017/11/17");
//        	list.add(map);
//        }else if(session.getAttribute("projectName").equals("海南清水湾B11-1、B11-2区2栋公寓、4栋高层及地下车库工程"))
//        {
//        	map.put("name", "海南清水湾B11-1、B11-2区2栋公寓、4栋高层及地下车库工程(海南清水湾B11-1、B11-2区2栋公寓、4栋高层及地下车库工程)");
//        	map.put("unitEngineering", "海南清水湾B11-1、B11-2区2栋公寓、4栋高层及地下车库工程");
//        	map.put("supervisionUnit", "陵水黎族自治县建设工程质量监督站");
//        	map.put("status", "监督中");
//        	map.put("applicationTime", "2017/3/5");
//        	list.add(map);
//        }
        else 
          {
          	map.put("name", "田德海泉湾A区项目");
          	map.put("unitEngineering", "六号楼、八号楼、七号楼、九号楼、五号楼、十号楼、农贸超市、四号楼、三号楼、地下车库、一号楼、二号楼");
          	map.put("supervisionUnit", "海口市美兰区建设工程质量安全监督站");
         	map.put("status", "监督中");
          	map.put("applicationTime", "2017/11/17");
          	list.add(map);
          }
        return getDataTable(list);
    }
    
    /**
     * 核查信息详情
     */
    @GetMapping("/supervisoryInformationDetail/{name}")
    public String supervisoryInformationDetail(@PathVariable("name") String name, ModelMap mmap,HttpSession session)
    {
    	if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
        {
    		mmap.put("unitName", "仁恒海棠公园一期（C区）(仁恒海棠公园一期(C区)) ");
        }else
        {
        	mmap.put("unitName", "六号楼、八号楼、七号楼、九号楼、五号楼、十号楼、农贸超市、四号楼、三号楼、地下车库、一号楼、二号楼");
        }
        mmap.put("projectName", name);
        
        return supervisoryInformationPrefix + "/SupervisoryInformationDetail";
    }
    
    @PostMapping("/unitEngineering")
    @ResponseBody
    public TableDataInfo unitEngineering(HttpSession session)
    {
        startPage();
        Map<String,Object> map=new HashMap<String,Object>();
        List<Map> list=new ArrayList<Map>();
        if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
        {
        	map.put("name", "仁恒海棠公园一期（C区）");
        	map.put("status", "在建（施工许可（审批通过））");
        	map.put("areaAll", "45555.1");
        	map.put("areaUp", "34147.8");
        	map.put("areaDown", "11407.3");
        	map.put("totalLayer", "26");
        	list.add(map);
          }//else if(session.getAttribute("projectName").equals("田德海泉湾A区"))
//        {
//        	map.put("name", "地下车库");
//        	map.put("status", "已竣工备案");
//        	map.put("areaAll", "4340.79");
//        	map.put("areaUp", "0");
//        	map.put("areaDown", "4340.79");
//        	map.put("totalLayer", "1");
//        	list.add(map);
//        }else if(session.getAttribute("projectName").equals("海南清水湾B11-1、B11-2区2栋公寓、4栋高层及地下车库工程"))
//        {
//        	map.put("name", "海南清水湾B11-1、B11-2区2栋公寓、4栋高层及地下车库工程");
//        	map.put("status", "在建（施工许可（审批通过））");
//        	map.put("areaAll", "149618.52");
//        	map.put("areaUp", "135897.4");
//        	map.put("areaDown", "13721.12");
//        	map.put("totalLayer", "26");
//        	list.add(map);
//        }
        else
        {
        	map.put("name", "地下车库");
        	map.put("status", "已竣工备案");
        	map.put("areaAll", "4340.79");
        	map.put("areaUp", "0");
        	map.put("areaDown", "4340.79");
        	map.put("totalLayer", "1");
        	list.add(map);
        }
        return getDataTable(list);
    }
    
    /**
     *  单位工程详情
    */
   @GetMapping("/unit/detail")
   public String unitDetail(String name,HttpSession session,ModelMap mmap)
   {
	   if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
	   {
		   mmap.put("unitName", name);
		   return prefix + "/projectAllUnitDetail";
	   }else {
		   mmap.put("unitName", name);
		   return prefix + "/projectAllUnitDetail";
	   }
	   	
   }
   
   @PostMapping("/materialTesting")
   @ResponseBody
   public TableDataInfo materialTesting(HttpSession session)
   {
       startPage();
       Map<String,Object> map=new HashMap<String,Object>();
       Map<String,Object> mapa=new HashMap<String,Object>();
       Map<String,Object> mapb=new HashMap<String,Object>();
       Map<String,Object> mapc=new HashMap<String,Object>();
       Map<String,Object> mapd=new HashMap<String,Object>();
       List<Map> list=new ArrayList<Map>();
       //if(session.getAttribute("projectName").equals("海南清水湾B11-1、B11-2区2栋公寓、4栋高层及地下车库工程"))
       //{
    	map.put("id", "1");
	    map.put("materialOrganization", "海南燝熔工程检测中心有限公司");
      	map.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
      	map.put("projectPosition", "NA-860栋负一层柱，首层梁板");
      	map.put("testingItems", "混凝土试块抗压测试");
      	map.put("curveTime", "2019-12-11");
      	map.put("entrustTime", "2019-12-10");
      	map.put("testingTime", "2019-12-11");
      	map.put("presentationTime", "2019-12-11");
      	map.put("sampleId", "Q0312092019-06355");
      	map.put("presentationId", "009AQ031291905126");
      	map.put("testingResult", "该混凝土..");
      	list.add(map);
      	mapa.put("id", "2");
      	mapa.put("materialOrganization", "海南燝熔工程检测中心有限公司");
      	mapa.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
      	mapa.put("projectPosition", "基础");
      	mapa.put("testingItems", "钢筋原材拉伸及抗压测试");
      	mapa.put("curveTime", "2019-12-10");
      	mapa.put("entrustTime", "2019-12-09");
      	mapa.put("testingTime", "2019-12-10");
      	mapa.put("presentationTime", "2019-12-11");
      	mapa.put("sampleId", "Q0312092019-00999");
      	mapa.put("presentationId", "009AQ0309001900418");
      	mapa.put("testingResult", "所检项目..");
      	list.add(mapa);
      	mapb.put("id", "3");
      	mapb.put("materialOrganization", "海南燝熔工程检测中心有限公司");
      	mapb.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
      	mapb.put("projectPosition", "NA-856栋一层柱");
      	mapb.put("testingItems", "钢筋原材拉伸及抗压测试");
      	mapb.put("curveTime", "2019-12-09");
      	mapb.put("entrustTime", "2019-12-09");
      	mapb.put("testingTime", "2019-12-09");
      	mapb.put("presentationTime", "2019-12-10");
      	mapb.put("sampleId", "Q0312092019-01007");
      	mapb.put("presentationId", "009AQ0312091905126");
      	mapb.put("testingResult", "所检项目..");
      	list.add(mapb);
      	mapc.put("id", "4");
      	mapc.put("materialOrganization", "海南燝熔工程检测中心有限公司");
      	mapc.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
      	mapc.put("projectPosition", "31#二十五层墙柱，二十六层梁板");
      	mapc.put("testingItems", "混凝土试块抗压测试");
      	mapc.put("curveTime", "2019-12-10");
      	mapc.put("entrustTime", "2019-12-10");
      	mapc.put("testingTime", "2019-12-10");
      	mapc.put("presentationTime", "2019-12-10");
      	mapc.put("sampleId", "Q0312092019-06354");
      	mapc.put("presentationId", "009AQ0312091905125");
      	mapc.put("testingResult", "该混凝土..");
      	list.add(mapb);
      	mapd.put("id", "5");
      	mapd.put("materialOrganization", "海南燝熔工程检测中心有限公司");
      	mapd.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
      	mapd.put("projectPosition", "NA-850栋基础承台，底板");
      	mapd.put("testingItems", "混凝土试块抗压测试");
      	mapd.put("curveTime", "2019-12-10");
      	mapd.put("entrustTime", "2019-12-10");
      	mapd.put("testingTime", "2019-12-10");
      	mapd.put("presentationTime", "2019-12-10");
      	mapd.put("sampleId", "Q0312092019-06352");
      	mapd.put("presentationId", "009AQ0312091905124");
      	mapd.put("testingResult", "该混凝土..");
      	list.add(mapd);
       //}
      	if(session.getAttribute("projectName").equals("田德海泉湾A区"))
      	{
      		map.put("id", "1");
    	    map.put("materialOrganization", "海南燝熔工程检测中心有限公司");
          	map.put("projectName", "田德海泉湾A区");
          	map.put("projectPosition", "NA-860栋负一层柱，首层梁板");
          	map.put("testingItems", "混凝土试块抗压测试");
          	map.put("curveTime", "2019-12-11");
          	map.put("entrustTime", "2019-12-10");
          	map.put("testingTime", "2019-12-11");
          	map.put("presentationTime", "2019-12-11");
          	map.put("sampleId", "Q0312092019-06355");
          	map.put("presentationId", "009AQ031291905126");
          	map.put("testingResult", "该混凝土..");
          	list.add(map);
          	mapa.put("id", "2");
          	mapa.put("materialOrganization", "海南燝熔工程检测中心有限公司");
          	mapa.put("projectName", "田德海泉湾A区");
          	mapa.put("projectPosition", "基础");
          	mapa.put("testingItems", "钢筋原材拉伸及抗压测试");
          	mapa.put("curveTime", "2019-12-10");
          	mapa.put("entrustTime", "2019-12-09");
          	mapa.put("testingTime", "2019-12-10");
          	mapa.put("presentationTime", "2019-12-11");
          	mapa.put("sampleId", "Q0312092019-00999");
          	mapa.put("presentationId", "009AQ0309001900418");
          	mapa.put("testingResult", "所检项目..");
          	list.add(mapa);
          	mapb.put("id", "3");
          	mapb.put("materialOrganization", "海南燝熔工程检测中心有限公司");
          	mapb.put("projectName", "田德海泉湾A区");
          	mapb.put("projectPosition", "NA-856栋一层柱");
          	mapb.put("testingItems", "钢筋原材拉伸及抗压测试");
          	mapb.put("curveTime", "2019-12-09");
          	mapb.put("entrustTime", "2019-12-09");
          	mapb.put("testingTime", "2019-12-09");
          	mapb.put("presentationTime", "2019-12-10");
          	mapb.put("sampleId", "Q0312092019-01007");
          	mapb.put("presentationId", "009AQ0312091905126");
          	mapb.put("testingResult", "所检项目..");
          	list.add(mapb);
          	mapc.put("id", "4");
          	mapc.put("materialOrganization", "海南燝熔工程检测中心有限公司");
          	mapc.put("projectName", "田德海泉湾A区");
          	mapc.put("projectPosition", "31#二十五层墙柱，二十六层梁板");
          	mapc.put("testingItems", "混凝土试块抗压测试");
          	mapc.put("curveTime", "2019-12-10");
          	mapc.put("entrustTime", "2019-12-10");
          	mapc.put("testingTime", "2019-12-10");
          	mapc.put("presentationTime", "2019-12-10");
          	mapc.put("sampleId", "Q0312092019-06354");
          	mapc.put("presentationId", "009AQ0312091905125");
          	mapc.put("testingResult", "该混凝土..");
          	list.add(mapb);
          	mapd.put("id", "5");
          	mapd.put("materialOrganization", "海南燝熔工程检测中心有限公司");
          	mapd.put("projectName", "田德海泉湾A区");
          	mapd.put("projectPosition", "NA-850栋基础承台，底板");
          	mapd.put("testingItems", "混凝土试块抗压测试");
          	mapd.put("curveTime", "2019-12-10");
          	mapd.put("entrustTime", "2019-12-10");
          	mapd.put("testingTime", "2019-12-10");
          	mapd.put("presentationTime", "2019-12-10");
          	mapd.put("sampleId", "Q0312092019-06352");
          	mapd.put("presentationId", "009AQ0312091905124");
          	mapd.put("testingResult", "该混凝土..");
          	list.add(mapd);
      	}else if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
      	{
      		map.put("id", "1");
    	    map.put("materialOrganization", "海南燝熔工程检测中心有限公司");
          	map.put("projectName", "仁恒海棠公园一期（C区）");
          	map.put("projectPosition", "NA-860栋负一层柱，首层梁板");
          	map.put("testingItems", "混凝土试块抗压测试");
          	map.put("curveTime", "2019-12-11");
          	map.put("entrustTime", "2019-12-10");
          	map.put("testingTime", "2019-12-11");
          	map.put("presentationTime", "2019-12-11");
          	map.put("sampleId", "Q0312092019-06355");
          	map.put("presentationId", "009AQ031291905126");
          	map.put("testingResult", "该混凝土..");
          	list.add(map);
          	mapa.put("id", "2");
          	mapa.put("materialOrganization", "海南燝熔工程检测中心有限公司");
          	mapa.put("projectName", "仁恒海棠公园一期（C区）");
          	mapa.put("projectPosition", "基础");
          	mapa.put("testingItems", "钢筋原材拉伸及抗压测试");
          	mapa.put("curveTime", "2019-12-10");
          	mapa.put("entrustTime", "2019-12-09");
          	mapa.put("testingTime", "2019-12-10");
          	mapa.put("presentationTime", "2019-12-11");
          	mapa.put("sampleId", "Q0312092019-00999");
          	mapa.put("presentationId", "009AQ0309001900418");
          	mapa.put("testingResult", "所检项目..");
          	list.add(mapa);
          	mapb.put("id", "3");
          	mapb.put("materialOrganization", "海南燝熔工程检测中心有限公司");
          	mapb.put("projectName", "仁恒海棠公园一期（C区）");
          	mapb.put("projectPosition", "NA-856栋一层柱");
          	mapb.put("testingItems", "钢筋原材拉伸及抗压测试");
          	mapb.put("curveTime", "2019-12-09");
          	mapb.put("entrustTime", "2019-12-09");
          	mapb.put("testingTime", "2019-12-09");
          	mapb.put("presentationTime", "2019-12-10");
          	mapb.put("sampleId", "Q0312092019-01007");
          	mapb.put("presentationId", "009AQ0312091905126");
          	mapb.put("testingResult", "所检项目..");
          	list.add(mapb);
          	mapc.put("id", "4");
          	mapc.put("materialOrganization", "海南燝熔工程检测中心有限公司");
          	mapc.put("projectName", "仁恒海棠公园一期（C区）");
          	mapc.put("projectPosition", "31#二十五层墙柱，二十六层梁板");
          	mapc.put("testingItems", "混凝土试块抗压测试");
          	mapc.put("curveTime", "2019-12-10");
          	mapc.put("entrustTime", "2019-12-10");
          	mapc.put("testingTime", "2019-12-10");
          	mapc.put("presentationTime", "2019-12-10");
          	mapc.put("sampleId", "Q0312092019-06354");
          	mapc.put("presentationId", "009AQ0312091905125");
          	mapc.put("testingResult", "该混凝土..");
          	list.add(mapb);
          	mapd.put("id", "5");
          	mapd.put("materialOrganization", "海南燝熔工程检测中心有限公司");
          	mapd.put("projectName", "仁恒海棠公园一期（C区）");
          	mapd.put("projectPosition", "NA-850栋基础承台，底板");
          	mapd.put("testingItems", "混凝土试块抗压测试");
          	mapd.put("curveTime", "2019-12-10");
          	mapd.put("entrustTime", "2019-12-10");
          	mapd.put("testingTime", "2019-12-10");
          	mapd.put("presentationTime", "2019-12-10");
          	mapd.put("sampleId", "Q0312092019-06352");
          	mapd.put("presentationId", "009AQ0312091905124");
          	mapd.put("testingResult", "该混凝土..");
          	list.add(mapd);
      	}
       return getDataTable(list);
   }
   
   @GetMapping("/materialTestingDetail/{id}")
   public String materialTestingDetail(@PathVariable("id") String id,ModelMap mmap,HttpSession session)
   {
	   mmap.put("projectCompany", session.getAttribute("projectCompany"));
	   if(id.equals("1"))
	   { 
		   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
		   mmap.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
		   mmap.put("projectPosition", "NA-860栋负一层柱，首层梁板");
		   mmap.put("testingItems", "混凝土试块抗压测试");
		   mmap.put("curveTime", "2019-12-11");
		   mmap.put("entrustTime", "2019-12-10");
		   mmap.put("testingTime", "2019-12-11");
		   mmap.put("presentationTime", "2019-12-11");
		   mmap.put("sampleId", "Q0312092019-06355");
		   mmap.put("presentationId", "009AQ031291905126");
		   mmap.put("testingResult", "该混凝土..");
	   }else if(id.equals("2"))
	   {
		   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
		   mmap.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
		   mmap.put("projectPosition", "基础");
		   mmap.put("testingItems", "钢筋原材拉伸及抗压测试");
		   mmap.put("curveTime", "2019-12-10");
		   mmap.put("entrustTime", "2019-12-09");
		   mmap.put("testingTime", "2019-12-10");
		   mmap.put("presentationTime", "2019-12-11");
		   mmap.put("sampleId", "Q0312092019-00999");
		   mmap.put("presentationId", "009AQ0309001900418");
		   mmap.put("testingResult", "所检项目.."); 
	   }else if(id.equals("3"))
	   {
		   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
		   mmap.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
		   mmap.put("projectPosition", "NA-856栋一层柱");
		   mmap.put("testingItems", "钢筋原材拉伸及抗压测试");
		   mmap.put("curveTime", "2019-12-09");
		   mmap.put("entrustTime", "2019-12-09");
		   mmap.put("testingTime", "2019-12-09");
		   mmap.put("presentationTime", "2019-12-10");
		   mmap.put("sampleId", "Q0312092019-01007");
		   mmap.put("presentationId", "009AQ0312091905126");
		   mmap.put("testingResult", "所检项目.."); 
	   }else if(id.equals("4"))
	   {
		   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
		   mmap.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
		   mmap.put("projectPosition", "31#二十五层墙柱，二十六层梁板");
		   mmap.put("testingItems", "混凝土试块抗压测试");
		   mmap.put("curveTime", "2019-12-10");
		   mmap.put("entrustTime", "2019-12-10");
		   mmap.put("testingTime", "2019-12-10");
		   mmap.put("presentationTime", "2019-12-10");
		   mmap.put("sampleId", "Q0312092019-06354");
		   mmap.put("presentationId", "009AQ0312091905125");
		   mmap.put("testingResult", "该混凝土.."); 
	   }else if(id.equals("5"))
	   {
		   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
		   mmap.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
		   mmap.put("projectPosition", "NA-850栋基础承台，底板");
		   mmap.put("testingItems", "混凝土试块抗压测试");
		   mmap.put("curveTime", "2019-12-10");
		   mmap.put("entrustTime", "2019-12-10");
		   mmap.put("testingTime", "2019-12-10");
		   mmap.put("presentationTime", "2019-12-10");
		   mmap.put("sampleId", "Q0312092019-06352");
		   mmap.put("presentationId", "009AQ0312091905124");
		   mmap.put("testingResult", "该混凝土..");
	   }
	   if(session.getAttribute("projectName").equals("田德海泉湾A区"))
	   {
		   if(id.equals("1"))
		   { 
			   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
			   mmap.put("projectName", "田德海泉湾A区");
			   mmap.put("projectPosition", "NA-860栋负一层柱，首层梁板");
			   mmap.put("testingItems", "混凝土试块抗压测试");
			   mmap.put("curveTime", "2019-12-11");
			   mmap.put("entrustTime", "2019-12-10");
			   mmap.put("testingTime", "2019-12-11");
			   mmap.put("presentationTime", "2019-12-11");
			   mmap.put("sampleId", "Q0312092019-06355");
			   mmap.put("presentationId", "009AQ031291905126");
			   mmap.put("testingResult", "该混凝土..");
		   }else if(id.equals("2"))
		   {
			   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
			   mmap.put("projectName", "田德海泉湾A区");
			   mmap.put("projectPosition", "基础");
			   mmap.put("testingItems", "钢筋原材拉伸及抗压测试");
			   mmap.put("curveTime", "2019-12-10");
			   mmap.put("entrustTime", "2019-12-09");
			   mmap.put("testingTime", "2019-12-10");
			   mmap.put("presentationTime", "2019-12-11");
			   mmap.put("sampleId", "Q0312092019-00999");
			   mmap.put("presentationId", "009AQ0309001900418");
			   mmap.put("testingResult", "所检项目.."); 
		   }else if(id.equals("3"))
		   {
			   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
			   mmap.put("projectName", "田德海泉湾A区");
			   mmap.put("projectPosition", "NA-856栋一层柱");
			   mmap.put("testingItems", "钢筋原材拉伸及抗压测试");
			   mmap.put("curveTime", "2019-12-09");
			   mmap.put("entrustTime", "2019-12-09");
			   mmap.put("testingTime", "2019-12-09");
			   mmap.put("presentationTime", "2019-12-10");
			   mmap.put("sampleId", "Q0312092019-01007");
			   mmap.put("presentationId", "009AQ0312091905126");
			   mmap.put("testingResult", "所检项目.."); 
		   }else if(id.equals("4"))
		   {
			   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
			   mmap.put("projectName", "田德海泉湾A区");
			   mmap.put("projectPosition", "31#二十五层墙柱，二十六层梁板");
			   mmap.put("testingItems", "混凝土试块抗压测试");
			   mmap.put("curveTime", "2019-12-10");
			   mmap.put("entrustTime", "2019-12-10");
			   mmap.put("testingTime", "2019-12-10");
			   mmap.put("presentationTime", "2019-12-10");
			   mmap.put("sampleId", "Q0312092019-06354");
			   mmap.put("presentationId", "009AQ0312091905125");
			   mmap.put("testingResult", "该混凝土.."); 
		   }else if(id.equals("5"))
		   {
			   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
			   mmap.put("projectName", "田德海泉湾A区");
			   mmap.put("projectPosition", "NA-850栋基础承台，底板");
			   mmap.put("testingItems", "混凝土试块抗压测试");
			   mmap.put("curveTime", "2019-12-10");
			   mmap.put("entrustTime", "2019-12-10");
			   mmap.put("testingTime", "2019-12-10");
			   mmap.put("presentationTime", "2019-12-10");
			   mmap.put("sampleId", "Q0312092019-06352");
			   mmap.put("presentationId", "009AQ0312091905124");
			   mmap.put("testingResult", "该混凝土..");
		   }
	   }else if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
	   {
		   if(id.equals("1"))
		   { 
			   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
			   mmap.put("projectName", "仁恒海棠公园一期（C区）");
			   mmap.put("projectPosition", "NA-860栋负一层柱，首层梁板");
			   mmap.put("testingItems", "混凝土试块抗压测试");
			   mmap.put("curveTime", "2019-12-11");
			   mmap.put("entrustTime", "2019-12-10");
			   mmap.put("testingTime", "2019-12-11");
			   mmap.put("presentationTime", "2019-12-11");
			   mmap.put("sampleId", "Q0312092019-06355");
			   mmap.put("presentationId", "009AQ031291905126");
			   mmap.put("testingResult", "该混凝土..");
		   }else if(id.equals("2"))
		   {
			   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
			   mmap.put("projectName", "仁恒海棠公园一期（C区）");
			   mmap.put("projectPosition", "基础");
			   mmap.put("testingItems", "钢筋原材拉伸及抗压测试");
			   mmap.put("curveTime", "2019-12-10");
			   mmap.put("entrustTime", "2019-12-09");
			   mmap.put("testingTime", "2019-12-10");
			   mmap.put("presentationTime", "2019-12-11");
			   mmap.put("sampleId", "Q0312092019-00999");
			   mmap.put("presentationId", "009AQ0309001900418");
			   mmap.put("testingResult", "所检项目.."); 
		   }else if(id.equals("3"))
		   {
			   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
			   mmap.put("projectName", "仁恒海棠公园一期（C区）");
			   mmap.put("projectPosition", "NA-856栋一层柱");
			   mmap.put("testingItems", "钢筋原材拉伸及抗压测试");
			   mmap.put("curveTime", "2019-12-09");
			   mmap.put("entrustTime", "2019-12-09");
			   mmap.put("testingTime", "2019-12-09");
			   mmap.put("presentationTime", "2019-12-10");
			   mmap.put("sampleId", "Q0312092019-01007");
			   mmap.put("presentationId", "009AQ0312091905126");
			   mmap.put("testingResult", "所检项目.."); 
		   }else if(id.equals("4"))
		   {
			   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
			   mmap.put("projectName", "仁恒海棠公园一期（C区）");
			   mmap.put("projectPosition", "31#二十五层墙柱，二十六层梁板");
			   mmap.put("testingItems", "混凝土试块抗压测试");
			   mmap.put("curveTime", "2019-12-10");
			   mmap.put("entrustTime", "2019-12-10");
			   mmap.put("testingTime", "2019-12-10");
			   mmap.put("presentationTime", "2019-12-10");
			   mmap.put("sampleId", "Q0312092019-06354");
			   mmap.put("presentationId", "009AQ0312091905125");
			   mmap.put("testingResult", "该混凝土.."); 
		   }else if(id.equals("5"))
		   {
			   mmap.put("materialOrganization", "海南燝熔工程检测中心有限公司");
			   mmap.put("projectName", "仁恒海棠公园一期（C区）");
			   mmap.put("projectPosition", "NA-850栋基础承台，底板");
			   mmap.put("testingItems", "混凝土试块抗压测试");
			   mmap.put("curveTime", "2019-12-10");
			   mmap.put("entrustTime", "2019-12-10");
			   mmap.put("testingTime", "2019-12-10");
			   mmap.put("presentationTime", "2019-12-10");
			   mmap.put("sampleId", "Q0312092019-06352");
			   mmap.put("presentationId", "009AQ0312091905124");
			   mmap.put("testingResult", "该混凝土..");
		   } 
	   }
       return materialTestingPrefix + "/detail";
   }
   
   @PostMapping("/projectFiles")
   @ResponseBody
   public TableDataInfo projectFiles(HttpSession session)
   {
       startPage();
       Map<String,Object> map=new HashMap<String,Object>();
       Map<String,Object> mapa=new HashMap<String,Object>();
       Map<String,Object> mapb=new HashMap<String,Object>();
       Map<String,Object> mapc=new HashMap<String,Object>();
       List<Map> list=new ArrayList<Map>();
    	
      	if(session.getAttribute("projectName").equals("田德海泉湾A区"))
      	{
      		map.put("time", "2018年8月13日");
    	    map.put("describe","田德海泉湾A区工程在平台建档");
          	list.add(map);
          	mapa.put("time", "2018年12月3日");
          	mapa.put("describe","田德海泉湾A区工程完成勘察成果");
          	list.add(mapa);
          	mapb.put("time", "2019年2月1日");
          	mapb.put("describe","田德海泉湾A区工程通过施工图检查");
          	list.add(mapb);
          	mapc.put("time", "2019年3月25日");
          	mapc.put("describe","田德海泉湾A区工程通过施工许可审查");
          	list.add(mapc);
      	}else if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
      	{
      		map.put("time", "2018年8月13日");
    	    map.put("describe","仁恒海棠公园一期（C区）工程在平台建档");
          	list.add(map);
          	mapa.put("time", "2018年12月3日");
          	mapa.put("describe","仁恒海棠公园一期（C区）工程完成勘察成果");
          	list.add(mapa);
          	mapb.put("time", "2019年2月1日");
          	mapb.put("describe","仁恒海棠公园一期（C区）工程通过施工图检查");
          	list.add(mapb);
          	mapc.put("time", "2019年3月25日");
          	mapc.put("describe","仁恒海棠公园一期（C区）工程通过施工许可审查");
          	list.add(mapc);
      	}else 
      	{
      		map.put("time", "2018年8月13日");
    	    map.put("describe","海南陵水香水湾B区C-01-1地块项目在平台建档");
          	list.add(map);
          	mapa.put("time", "2018年12月3日");
          	mapa.put("describe","海南陵水香水湾B区C-01-1地块项目完成勘察成果");
          	list.add(mapa);
          	mapb.put("time", "2019年2月1日");
          	mapb.put("describe","海南陵水香水湾B区C-01-1地块项目通过施工图检查");
          	list.add(mapb);
          	mapc.put("time", "2019年3月25日");
          	mapc.put("describe","海南陵水香水湾B区C-01-1地块项目通过施工许可审查");
          	list.add(mapc);
      	}
       return getDataTable(list);
   }
   
   @PostMapping("/tabJiancha")
   @ResponseBody
   public TableDataInfo tabJiancha(HttpSession session)
   {
       startPage();
       Map<String,Object> map=new HashMap<String,Object>();
       Map<String,Object> mapa=new HashMap<String,Object>();
       Map<String,Object> mapb=new HashMap<String,Object>();
       Map<String,Object> mapc=new HashMap<String,Object>();
       List<Map> list=new ArrayList<Map>();
       if(session.getAttribute("projectName").equals("海南陵水香水湾B区C-01-1地块项目"))
       {
          map.put("id", "1");
    	  map.put("time", "2019-08-07");
    	  map.put("peopleName", "叶宗贵");
    	  map.put("type", "综合检查");
    	  map.put("position", "详情见整改通知书");
    	  map.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
    	  map.put("company", "海南雅居乐房地产开发有限公司");
    	  list.add(map);
    	  mapa.put("id", "2");
    	  mapa.put("time", "2018-06-28");
    	  mapa.put("peopleName", "邓承军");
    	  mapa.put("type", "质量");
    	  mapa.put("position", "基础分部验收");
    	  mapa.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
    	  mapa.put("company", "海南雅居乐房地产开发有限公司");
    	  list.add(mapa);
       }else if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
       {
    	  map.put("id", "1");
     	  map.put("time", "2018-12-06");
     	  map.put("peopleName", "林志勇");
     	  map.put("type", "综合检查");
     	  map.put("position", "2#塔吊，3#施工电梯");
     	  map.put("projectName", "仁恒海棠公园一期(仁恒海棠公园一期（C）区)");
     	  map.put("company", "海南陆侨集团有限公司");
     	  list.add(map);
       }else if(session.getAttribute("projectName").equals("田德海泉湾A区"))
       {
    	   
       }
       return getDataTable(list);
   }
   
   @GetMapping("/tabJianchadetail/{id}")
   public String tabJianchadetail(@PathVariable("id") String id,ModelMap mmap,HttpSession session)
   {
	   if(session.getAttribute("projectName").equals("海南陵水香水湾B区C-01-1地块项目"))
	   {
		   if(id.equals("1"))
		   {
			   mmap.put("time", "2019-08-07");
			   mmap.put("peopleName", "叶宗贵");
			   mmap.put("type", "综合检查");
			   mmap.put("position", "详情见整改通知书");
			   mmap.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
			   mmap.put("company", "海南雅居乐房地产开发有限公司");
		   }else if(id.equals("2"))
		   {
			   mmap.put("time", "2018-06-28");
			   mmap.put("peopleName", "邓承军");
			   mmap.put("type", "质量");
			   mmap.put("position", "基础分部验收");
			   mmap.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
			   mmap.put("company", "海南雅居乐房地产开发有限公司");
		   } 
	   }else if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
	   {
		   if(id.equals("1"))
		   {
			   mmap.put("time", "2018-12-06");
			   mmap.put("peopleName", "林志勇");
			   mmap.put("type", "综合检查");
			   mmap.put("position", "2#塔吊，3#施工电梯");
			   mmap.put("projectName", "仁恒海棠公园一期(仁恒海棠公园一期（C）区)");
			   mmap.put("company", "海南陆侨集团有限公司");
		   }
	   }else if(session.getAttribute("projectName").equals("田德海泉湾A区"))
	   {
		   
	   }
	   
       return "supervise/project/chekrecord";
   }
   
   @PostMapping("/tabZhenggai")
   @ResponseBody
   public TableDataInfo tabZhenggai(HttpSession session)
   {
       startPage();
       Map<String,Object> map=new HashMap<String,Object>();
       Map<String,Object> mapa=new HashMap<String,Object>();
       Map<String,Object> mapb=new HashMap<String,Object>();
       Map<String,Object> mapc=new HashMap<String,Object>();
       List<Map> list=new ArrayList<Map>();
       if(session.getAttribute("projectName").equals("海南陵水香水湾B区C-01-1地块项目"))
       {
          map.put("id", "1");
    	  map.put("time", "2018-06-28");
    	  map.put("peopleName", "邓承军");
    	  map.put("notificationUnit", " ");
    	  map.put("endTime", " ");
    	  map.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
    	  list.add(map);
       }else if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
       {
    	   
       }else if(session.getAttribute("projectName").equals("田德海泉湾A区"))
       {
    	   
       }
       return getDataTable(list);
   }
   
   @GetMapping("/tabZhenggaidetail/{id}")
   public String tabZhenggaidetail(@PathVariable("id") String id,ModelMap mmap,HttpSession session)
   {
	   if(session.getAttribute("projectName").equals("海南陵水香水湾B区C-01-1地块项目"))
	   {
		   if(id.equals("1"))
		   {
			   mmap.put("time", "2018-06-28");
			   mmap.put("peopleName", "邓承军");
			   mmap.put("noticeType", " ");
			   mmap.put("notificationUnit", " ");
			   mmap.put("endTime", " ");
			   mmap.put("projectName", "海南陵水香水湾B区C-01-1地块项目");
			   mmap.put("company", "海南雅居乐房地产开发有限公司");
			   mmap.put("constructionUnit", "广州振中建设有限公司");
			   mmap.put("constructionControlUnit", "广州穗科建设管理有限公司");
			   mmap.put("noticeNo", " ");
			   mmap.put("supervisionStation", "陵水黎族自治县建设工程质量监督站");
			   mmap.put("notificationContent", " ");
			   mmap.put("handlingOpinions", " ");
			   mmap.put("problemContent", " ");
		   } 
	   }else if(session.getAttribute("projectName").equals("仁恒海棠公园一期（C区）"))
	   {
		   
	   }else if(session.getAttribute("projectName").equals("田德海泉湾A区"))
	   {
		   
	   }
	   
       return "supervise/project/rectification";
   }
}
